In recent years, attempts have been made to develop technologies for protecting application programs by means of software, to prevent the application programs, which include confidential data, from being analyzed by a malicious third party (hereinafter referred to as “attacker”).
One of such technologies for protecting application programs by means of software is, for example, a tampering verification technology using hash values. Another example is the decryption load function which is a function to encrypt an application program and store the encrypted application program when the application is not used, and to decrypt the encrypted application program and load the application program into the memory only when the application program is used.
Even when such technology is used, however, the very software that is used to protect application programs (hereinafter, a “protection control module”) may be tampered with by the attacker. If the protection control module is tampered with, application programs are also exposed to attack by the attacker. One of the technologies for countering such an attack is to use a detection module that detects whether the protection control module is tampered with.
The detection module attempts to detect tampering of the protection control module by reading all the data constituting the protection control module, calculating the MAC (Message Authentication Code) value, and comparing the calculated MAC value with a MAC value that has been stored in advance.